import request from '@/utils/request'

// 获取验证码
export function getSmsCode(data: {
  phone: string
}): any {
  return request({
    url: '/sms/send',
    method: 'get',
    params: data
  })
}

//获取图片验证码
export function getCode(): any {
  return request({
    url: '/staff/getCode',
    method: 'get',
    responseType: 'blob',
  })
}

//下载
export function download(data: {
  id: string
}): any {
  return request({
    url: '/file/download',
    method: 'get',
    params: data,
    responseType: 'blob',
  })
}

// 获取码表
export function getByDictType(data: {dictTypes: string}): any {
  return request({
    url: '/dict/getByDictType',
    method: 'get',
    params: data
  })
}
